Skip to content

Decorate exception-based failures with seed#107

Closed
pbrisbin wants to merge 4 commits into
mainfrom
pb/log-seed
Closed

Decorate exception-based failures with seed#107
pbrisbin wants to merge 4 commits into
mainfrom
pb/log-seed

Conversation

@pbrisbin

Copy link
Copy Markdown
Member

fix!: include seed on failures do to exceptions

3a67a3a

By making any SomeException an HUnitFailure, we can use our
logFailingSeed function to ensure we include the seed on those
failures too.

This does break exception handling happening outside of runGraphulaT,
since any external catches for not-HUnitFailure will no longer catch.

chore: refactor FailureReason message building

a4b26d4

Prefixing the text after using formatFailureReason erases the fact
that the values was a Reason vs ExpectedButGot. The new approach
prepends the text without changing the constructor.

I doubt this matters, but it was easy enough and stops disrupting anyone
inspecting such values (perhaps our JUnit formatter?).

chore: update tests for new exceptions

73595f7

chore: prefix with line breaks

b2343d5

pbrisbin added 4 commits June 15, 2026 17:00
By making any `SomeException` an `HUnitFailure`, we can use our
`logFailingSeed` function to ensure we include the seed on those
failures too.

This does break exception handling happening outside of `runGraphulaT`,
since any external catches for not-`HUnitFailure` will no longer catch.
Prefixing the text after using `formatFailureReason` erases the fact
that the values was a `Reason` vs `ExpectedButGot`. The new approach
prepends the text without changing the constructor.

I doubt this matters, but it was easy enough and stops disrupting anyone
inspecting such values (perhaps our JUnit formatter?).
@pbrisbin pbrisbin changed the title chore: prefix with line breaks Decorate exception-based failures with seed Jun 16, 2026
@pbrisbin

Copy link
Copy Markdown
Member Author

I don't like this approach. I commented about why in #44.

@pbrisbin pbrisbin closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant